<?php

class User_Form_ResetPass extends Front_Base_Form_Horizontal
{
	
	public function getFormId() {
		$className = get_class($this);
		return strtolower($className);
	}
	
    public function init()
    {
        $this->setIsArray(true);
        //$this->setElementsBelongTo('bootstrap');

        $this->_addClassNames('form-reset-pass');

        // Password
        $this->addElement('password', 'password', array(
            'id' => 'dangky_matkhau',
            'label' => $this->getView()->translate('PASSWORD'),
            'maxlength' => 255,
            'class' => 'inputBox input1',
            'autocomplete' => 'off'
        ));
        $this->getElement('password')
        ->addFilter('StringTrim')
        ->addFilter('StripTags')
        ->setRequired(true)
        ->addValidators(array(
            array('NotEmpty', true),
            array('stringLength', false, array(6, 255)),
        ));
        
        // Confirm Password
        $this->addElement('password', 'confirmpwd', array(
            'id' => 'dangky_matkhau2',
            'maxlength' => 255,
            'class' => 'inputBox input1',
            'autocomplete' => 'off'
        ));
        $this->getElement('confirmpwd')
        ->addFilter('StringTrim')
        ->addFilter('StripTags')
        ->setRequired(true)
        ->addValidators(array(
            array('Identical', false, array('token' => 'password')),
            array('stringLength', false, array(6, 255)),
        ));
        
        // Email
        $this->addElement('hidden', 'email_recover', array(
            'id' => 'dangky_email',
            'maxlength' => 100,
            'class' => 'inputBox input1'
        ));
        $this->getElement('email_recover')
        ->addFilter('StringTrim')
        ->addFilter('StripTags')
        ->setRequired(true)
        ->addValidators(array(
            array('NotEmpty', true),
            array('stringLength', false, array(3, 100)),
            array('EmailAddress')
        ));
    }

}